'use strict';

module.exports = app => {
    class MyController extends app.Controller {

        //我的首页
        async my(){
            const data = await this.service.my.getteacherinfo();
            await this.ctx.render("/my/my.html",{data});
        };


        //设置
        async setting(){
            await this.ctx.render("/my/setting/setting.html");
        };


        //修改电话
        async changephone(){
            await this.ctx.render("my/setting/changephone.html");
        };


        //修改密码
        async changepwd(){
            await this.ctx.render("my/setting/changepwd.html");
        }


        //验证码接口调用
        async getyzm(){
            const params = this.ctx.request.query;
            const data = await this.service.my.getyzm(params);
            this.success();
        }

        //修改密码接口调用
        async editpassword(){
            const params = this.ctx.request.body;
            const data = await this.service.my.editpassword(params);
            this.success();
        }


    }
    return MyController;
};

